<template>
  <!-- 手机端 和 PC端 电脑端 首页设置 -->
  <div class="app-container" v-loading="loading">
    <themeOpenVue ref="themeOpenVue" :tenantId="tenantInfo.tenantId" @kaitong="kaitong" @xufei="submitForm"></themeOpenVue>
    <moduleOpenDialog :tenantId="tenantInfo.tenantId" :campNumber="tenantInfo.campNumber" ref="moduleOpenDialog" @success="init"></moduleOpenDialog>
  </div>
</template>

<script>
import themeOpenVue from "@/components/tenant/themeOpenVue.vue"
import moduleOpenDialog from "@/components/tenant/moduleOpenDialog.vue"
export default {
  name: "",
  components: { themeOpenVue ,moduleOpenDialog},
  data() {
    return {
      loading:false,
    };
  },
  computed:{
    tenantInfo(){
      // this.$store.getters.shopInfo
      // console.log("%c Line:23 🥓 this.$store.getters.shopInfo", "color:#4fff4B", this.$store.getters.shopInfo);
      return this.$store.getters.shopInfo
    }
  },
  mounted(){
    this.$nextTick(()=>{
      this.init()
    })
  },
  methods: {
    init(){
      this.$refs.themeOpenVue.getthemeList()
    },
    // 续费
    submitForm(item){
      console.log("%c Line:38 🍧 item", "color:#ed9ec7", item);
      let type=1
      if(item.serveType) {
        type = item.serveType
        item.groupId = item.businessId
      }
      this.$refs.moduleOpenDialog.open(item,2,type)
    },
    // 开通功能模块服务
    kaitong(item){
      let type=1
      if(item.serveType) type = item.serveType
      this.$refs.moduleOpenDialog.open(item,1,type)
    },
  }
};
</script>
<style lang="scss" scoped>

</style>
